pub fn new_birthday_probability(n: u32) -> f64 {
    assert!(n >= 2, "n must be greater than or equal to 2");
    // 计算没有人同一天过生日的概率
    let mut probability_no_shared = 1.0;
    for i in 0..n {
        probability_no_shared *= (365 - i) as f64 / 365.0;
    }

    // 计算至少有两个人同一天过生日的概率
    let probability_shared = 1.0 - probability_no_shared;

    // 返回结果，保留四位小数
    (probability_shared * 10000.0).round() / 10000.0
}
